package cn.tedu.search.repository;

import cn.tedu.search.entity.Student;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface StudentRepository extends ElasticsearchRepository<Student,Long> {

    Page<Student> queryByAddressMatches(String address, Pageable pageable);

    List<Student> queryByAddressMatchesOrderByAgeDesc(String address);

}
